

//
//  HeaderView.m
//  BeautifulView
//
//  Created by qianfeng on 16/3/24.
//  Copyright © 2016年 王卓越. All rights reserved.
//

#import "HeaderView.h"


@implementation HeaderView


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubViews];
    }
    return self;
}

- (void)createSubViews{
    UILabel *label = [[UILabel alloc]initWithFrame:self.bounds];
    label.backgroundColor = [UIColor blackColor];
    label.textColor = [UIColor whiteColor];

    label.numberOfLines = 0;
    label.font = [UIFont systemFontOfSize:12];
    label.tag = 10;
    [self addSubview:label];

}

-(void)setTitle:(NSString *)title{
    _title = title;
    UILabel *label = (UILabel *)[self viewWithTag:10];
    label.text = _title;
}

@end
